package o;

import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.extractor.ts.TsPayloadReader.a;
import java.util.List;

public final class agy {
    private final List<Format> ˋ;
    private final aef[] ॱ;

    public agy(List<Format> list) {
        this.ˋ = list;
        this.ॱ = new aef[list.size()];
    }

    public void ˊ(ady o_ady, a aVar) {
        for (int i = 0; i < this.ॱ.length; i++) {
            aVar.ˊ();
            aef ˊ = o_ady.ˊ(aVar.ˏ(), 3);
            Format format = (Format) this.ˋ.get(i);
            String str = format.ʽ;
            boolean z = "application/cea-608".equals(str) || "application/cea-708".equals(str);
            amm.ˊ(z, "Invalid closed caption mime type provided: " + str);
            ˊ.ˎ(Format.ˏ(aVar.ˎ(), str, null, -1, format.ʾ, format.ˋˊ, format.ˊᐝ, null, Long.MAX_VALUE, format.ʼ));
            this.ॱ[i] = ˊ;
        }
    }

    public void ˏ(long j, anc o_anc) {
        if (o_anc.ˊ() >= 9) {
            int ॱᐝ = o_anc.ॱᐝ();
            int ॱᐝ2 = o_anc.ॱᐝ();
            int ʽ = o_anc.ʽ();
            if (ॱᐝ == 434 && ॱᐝ2 == ajv.ˋ && ʽ == 3) {
                ajv.ˏ(j, o_anc, this.ॱ);
            }
        }
    }
}
